package lumis.service.comment;

import lumis.content.service.ContentListServiceInterface;
import lumis.content.service.DetailsUtil;
import lumis.portal.PortalException;
import lumis.portal.PortalRequestParameters;
import lumis.portal.serviceinterface.IServiceInterfaceRenderRequest;
import lumis.portal.serviceinterface.IServiceInterfaceRenderResponse;
import lumis.portal.serviceinterface.ServiceInterfaceException;
/**
 * It decides if the interface is rendered or not, based 
 * on the presence of an itemId.
 *
 * @version $Revision: 6617 $ $Date: 2007-04-27 11:25:37 -0300 (Fri, 27 Apr 2007) $
 * @since 4.0.10
 */
public class CommentListServiceInterface extends ContentListServiceInterface
{

	@Override
	public void render(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response) throws ServiceInterfaceException, PortalException
	{
		String itemId = request.getParameter(PortalRequestParameters.PAGE_PARAMETER_ITEMID);
		
		if(itemId == null)
			itemId = DetailsUtil.getCurrentItemId();
		
		if(itemId != null)
			super.render(request, response);
	}
}
